//南航明珠商城-审核专题活动.js


//js去掉空格
function trim(str){
    return  (str+"").replace(/^\s+|\s+$/g,"");
}
function cancle(){
	var index = parent.layer.getFrameIndex(window.name);
	parent.layer.close(index);
}
function audit(through){
	var remark =$.trim($("#remark").val());
	if(remark == '') {
		layer.alert("审核意见为必填项");
		return false;
	}
	var specialTopicId=$("#specialTopicId").val();
	var remark=$("#remark").val();
			var layer_load_window = layer.load(2); 
			 $.ajax({
					url : path+"/special_topic/audit_special_topic",
					cache : false,
					type : 'post',
					dataType : 'text',
					data:{'specialTopicId':specialTopicId,
						'remark':trim(remark),
						'through':through},
					error : function() {
						layer.alert("操作失败！");
			       },
					success : function(data) {
					    if(data == "success"){
						    layer.msg('审核操作成功!',{icon:1,time:1000},function(){
						    	var index = parent.layer.getFrameIndex(window.name);
						    	parent.$("#search_form").submit();
						    	parent.layer.close(index);
						    });
					   }else{
						layer.alert("操作失败！");
					   }
					},
					complete: function(XMLHttpRequest, textStatus) {
						layer.close(layer_load_window);
					}
				  })	
}